#pragma once

#include <QObject>
#include <QString>

class MsgHtmlObj : public QObject
{
	Q_OBJECT
	//Q_PROPERTY(QString msgLHtmlTmpl MEMBER m_msgLHtmlTmpl NOTIFY signalMsgHtml)
	//Q_PROPERTY(QString msgRHtmlTmpl MEMBER m_msgRHtmlTmpl NOTIFY signalMsgHtml)
	Q_PROPERTY(QString msgLHtmlTmpl MEMBER m_msgLHtmlTmpl NOTIFY signalMsgHtml)
	Q_PROPERTY(QString msgRHtmlTmpl MEMBER m_msgRHtmlTmpl NOTIFY signalMsgHtml)

public:
	MsgHtmlObj(QObject *parent, QString msgLPicPath = "");//f 头像路径
	~MsgHtmlObj();

signals:
	void signalMsgHtml(const QString &html);
	
private:
	QString m_msgLHtmlTmpl;
	QString m_msgRHtmlTmpl;

	QString m_msgLPicPath;

private:
	void initHtmlTmpl();

	QString getMsgTmplHtml(const QString &code);

};
